package cn.inurl.logic;

import java.util.List;

import cn.inurl.bean.Domain;
import cn.inurl.consts.Constants;

public class ShopCardAddLogic {
	public void addDomain2ShopCard(List<Domain> domains) {
		if (domains.size() < 1)
			return;
		StringBuilder queryUrl = new StringBuilder(Constants.SHOP_CARD_ADD_URI);
		for (Domain domain : domains) {
			if (domain.getStatus() == Constants.DOMAIN_STATUS_AVAILABLE)
				queryUrl.append(domain.getDomain()).append(",");
		}
		HttpClientFactory.execGetMethod(queryUrl.substring(0,
				queryUrl.length() - 1));
	}
}
